package demo;

import java.util.List;

import weibo4j.Query;
import weibo4j.SearchResult;
import weibo4j.Weibo;
import weibo4j.WeiboException;

public class WeiboSerchTest {

	public static void main(String[] args) {
		List<SearchResult> sr = null;
		System.setProperty("weibo4j.oauth.consumerKey", "4229079448");
    	System.setProperty("weibo4j.oauth.consumerSecret", "bc58f8c7179369d4bfa914656c161b15");
    	Weibo weibo = new Weibo();
		weibo.setToken("2bd1ace341c6ac952b75b1e8db4a9a40","e8487f637ee6b3bd38b05ca0f142a459");
		Query q = new Query();
		q.setQ("新闻");
		try {
			sr = weibo.search(q);
			System.out.println(q.getQ());
		} catch (WeiboException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("======:" + sr);
	}

}
